package com.chocus.core.controller;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.chocus.core.bean.TestDb;
import com.chocus.core.service.TestDbService;

@Controller
public class TestController {
	
	@Autowired
	private TestDbService testDbService;
	
	@RequestMapping(value="test/control")
	public String testController(){
		TestDb testDb = new TestDb();
		testDb.setName("lala2");
		testDb.setBirthday(new Date());
		testDbService.insert(testDb);
		return "/index.jsp";
	}
}
